package com.yuwubao.hz_International.controllers.app

import com.yuwubao.hz_International.services.AliService
import com.yuwubao.hz_International.util.RestApiResponse
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import org.springframework.web.bind.annotation.*
import javax.annotation.Resource

@RestController
@CrossOrigin
@RequestMapping("app/pay")
@Api("支付文档")
open class PayAPi {

    @Resource
    private lateinit var aliService: AliService


    @PostMapping("info")
    @ApiOperation("支付宝充值")
    fun ali(@RequestParam userId: Int, @RequestParam money: Double): RestApiResponse<Any> {
        val result = RestApiResponse<Any>()
        val str = aliService.info(userId, money)
        result.successResponse(str)
        return result
    }

}